<html>
<#include  "../common/header.ftl">
<body>
<div id="wrapper" class="toggled">

    <!--边栏 -->
    <#include  "../common/nav.ftl">

    <!-- 主体内容-->
    <div id="page-content-wrapper">
        <div class="container-fluid">
            <div class="row clearfix">
                <div class="col-md-12 column">
                    <table class="table table-bordered table-condensed">
                        <thead>
                        <tr>
                            <th>券编号</th>
                            <th>券名称</th>
                            <th>券code</th>
                            <th>种类</th>
                            <th>单价</th>
                            <th>库存</th>
                            <th>范围</th>
                            <th>状态</th>
                            <th>商家编号</th>
                            <th>活动有效时间</th>
                            <th>消费有效时间</th>
                            <th>创建时间</th>
                            <th>修改时间</th>
                            <th>图片</th>
                            <th colspan="2">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <#list couponPage.content as couponInfo>
                        <tr>
                            <td>${couponInfo.couponId}</td>
                            <td>${couponInfo.couponName}</td>
                            <td>${couponInfo.couponCode}</td>
                            <td>${couponInfo.couponType}</td>
                            <td>${couponInfo.couponPrice}</td>
                            <td>${couponInfo.couponStock}</td>
                            <td>${couponInfo.couponRank}</td>
                            <td>${couponInfo.getCouponEnum().message}  </td>
                            <td>${couponInfo.bussinessId}</td>
                            <td>${couponInfo.activityDurationStart}<span>~</span>
                                ${couponInfo.activityDurationEnd}
                            </td>
                            <td>${couponInfo.useDurationStart}<span>~</span>
                                ${couponInfo.useDurationEnd}
                            </td>
                            <td>${couponInfo.createTime}</td>
                            <td>${couponInfo.updateTime}</td>
                            <td>${couponInfo.couponIcon}</td>
                            <td>

                                <a href="/fanZone/seller/coupon/index?couponId=${couponInfo.couponId}">修改</a></td>
                            <td>
                                <#if couponInfo.getCouponEnum().message=="在架">
                                    <a href="/fanZone/seller/coupon/off_sale?couponId=${couponInfo.couponId}">下架</a>
                                <#else >
                                    <a href="/fanZone/seller/coupon/on_sale?couponId=${couponInfo.couponId}">上架</a>
                                </#if>
                            </td>
                        </tr>
                        </#list>

                        </tbody>
                    </table>
                </div>
                <div class="col-md-12 column">
                    <ul class="pagination pull-right">
                    <#if currentPage lte 1>
                        <li class="disabled"><a href="#">上一页</a></li>
                    <#else>
                        <li ><a href="/fanZone/seller/coupon/list?page=${currentPage-1}&size=${size}">上一页</a></li>
                    </#if>

                    <#list 1..couponPage.getTotalPages() as index>
                        <#if currentPage==index>
                            <li class="disabled"><a href="#">${index}</a></li>
                        <#else >
                            <li><a href="/fanZone/seller/coupon/list?page=${index}&size=${size}">${index}</a></li>

                        </#if>
                    </#list>
                    <#if currentPage gte couponPage.getTotalPages()>
                        <li class="disabled"><a href="#">下一页</a></li>
                    <#else>
                        <li ><a href="/fanZone/seller/coupon/list?page=${currentPage+1}&size=${size}">下一页</a></li>
                    </#if>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>